package com.boshao.classschedule;

import android.app.Application;

/**
 * Application类，应用的初始化
 * @author boshao
 *
 */
public class ClassApplication extends Application{
	private static ClassApplication mInstance;
	private int mDisplayWidth;
	private int mDisplayHeight;
	private int mAddWhat;
	
	public static ClassApplication getInstance(){
		return mInstance;
	}
		
	@Override
	public void onCreate() {
		super.onCreate();
		mInstance = this;
	}
	
	public int getStatusBarHeight() {
	    int result = 0;
	    int resourceId = getResources().getIdentifier( "status_bar_height" , "dimen" , "android") ;
	    if (resourceId > 0) {
	        result = getResources().getDimensionPixelSize(resourceId);
	    }
	    return result;
	}
	
	public int getDisplayWidth() {
		return mDisplayWidth;
	}

	public void setDisplayWidth(int displayWidth) {
		this.mDisplayWidth = displayWidth;
	}

	public int getDisplayHeight() {
		return mDisplayHeight;
	}

	public void setDisplayHeight(int displayHeight) {
		this.mDisplayHeight = displayHeight;
	}

	public void setAddWhat(int add){
		mAddWhat = add;
	}
	
	public int getAddWhat(){
		return mAddWhat;
	}
	
}
